<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>如何使用滚动条来显示元素内溢出的内容</title>
    <!--这个例子演示了overflow属性创建一个滚动条，当一个元素的内容在指定的区域过大时如何设置以适应。-->
    <style>
        div.scroll
        {
            background-color: #00FFFF;
            width: 100px;
            height: 100px;
            overflow: scroll;
        }

        div.hidden
        {
            background-color: #00FF00;
            width: 100px;
            height: 100px;
            overflow: hidden;
        }
    </style>
</head>
<body>
<p>overflow属性规定当内容溢出元素框内时发生的事情。</p>

<p>overflow:scroll</p>
<div class="scroll">You can use the overflow property when you want to have better control of the layout. The default value is visible.</div>

<p>overflow:hidden</p>
<div class="hidden">You can use the overflow property when you want to have better control of the layout. The default value is visible.</div>
</body>
</html>